package com.ruoyi.business.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.business.mapper.WsdLeaveTypesMapper;
import com.ruoyi.business.service.IWsdLeaveTypesService;
import com.ruoyi.common.core.domain.entity.WsdLeaveTypes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 请假类型表 服务实现类
 * </p>
 *
 * @author wwq
 * @since 2024-05-08
 */
@Service
public class WsdLeaveTypesServiceImpl extends ServiceImpl<WsdLeaveTypesMapper, WsdLeaveTypes> implements IWsdLeaveTypesService {

    @Autowired
    private WsdLeaveTypesMapper wsdLeaveTypesMapper;

    /**
     * 查询请假类型
     *
     * @param leaveTypeId 请假类型主键
     * @return 请假类型
     */
    @Override
    public WsdLeaveTypes selectWsdLeaveTypesByLeaveTypeId(Long leaveTypeId) {
        return wsdLeaveTypesMapper.selectWsdLeaveTypesByLeaveTypeId(leaveTypeId);
    }

    /**
     * 查询请假类型列表
     *
     * @param wsdLeaveTypes 请假类型
     * @return 请假类型
     */
    @Override
    public List<WsdLeaveTypes> selectWsdLeaveTypesList(WsdLeaveTypes wsdLeaveTypes) {
        return wsdLeaveTypesMapper.selectWsdLeaveTypesList(wsdLeaveTypes);
    }

    /**
     * 新增请假类型
     *
     * @param wsdLeaveTypes 请假类型
     * @return 结果
     */
    @Override
    public int insertWsdLeaveTypes(WsdLeaveTypes wsdLeaveTypes)
    {
        return wsdLeaveTypesMapper.insertWsdLeaveTypes(wsdLeaveTypes);
    }

    /**
     * 修改请假类型
     *
     * @param wsdLeaveTypes 请假类型
     * @return 结果
     */
    @Override
    public int updateWsdLeaveTypes(WsdLeaveTypes wsdLeaveTypes)
    {
        return wsdLeaveTypesMapper.updateWsdLeaveTypes(wsdLeaveTypes);
    }

    /**
     * 批量删除请假类型
     *
     * @param leaveTypeIds 需要删除的请假类型主键
     * @return 结果
     */
    @Override
    public int deleteWsdLeaveTypesByLeaveTypeIds(Long[] leaveTypeIds)
    {
        return wsdLeaveTypesMapper.deleteWsdLeaveTypesByLeaveTypeIds(leaveTypeIds);
    }

    /**
     * 删除请假类型信息
     *
     * @param leaveTypeId 请假类型主键
     * @return 结果
     */
    @Override
    public int deleteWsdLeaveTypesByLeaveTypeId(Long leaveTypeId)
    {
        return wsdLeaveTypesMapper.deleteWsdLeaveTypesByLeaveTypeId(leaveTypeId);
    }

}
